setSwitchTypeface

open fun setSwitchTypeface(tf: Typeface, style: Int)(source)

Sets the typeface and style in which the text should be displayed on the switch, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.


open fun setSwitchTypeface(typeface: Typeface)(source)

Sets the typeface in which the text should be displayed on the switch. Note that not all Typeface families actually have bold and italic variants, so you may need to use setSwitchTypeface to get the appearance that you actually want.